const goodsItem = require('./data/goodsItem')
module.exports = app => {
    const mongoose = app.mongoose;
    const Schema = mongoose.Schema;
   
    const UserSchema = new Schema({
        userId: { type: String  },
        userName: { type: String  },
        userPwd: { type: String  },
        cartList: [
            {
                ...goodsItem,
                productNum:{
                    type:Number,
                    default:1
                }
            }
        ],
    });
   
    return mongoose.model('User', UserSchema,"user");
  }